using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using GZTW.AyaNova.BLL; using Infragistics.Win; using log4net; namespace AyaNova { /// /// Summary description for WikiFileOpenSave. /// public class WikiFileOpenSave : System.Windows.Forms.Form { // Create a logger for use in this class //case 1039 private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private System.Windows.Forms.Panel WikiFileOpenSave_Fill_Panel; private System.Windows.Forms.Button btnOK; private System.Windows.Forms.Button btnCancel; private Label lblFile; private System.Windows.Forms.Button btnRefresh; //private System.ComponentModel.IContainer components; public WikiFileOpenSave(AyaFileList.AyaFileListInfo i) { mFileInfo = i; // // Required for Windows Form Designer support // InitializeComponent(); // // // } private AyaFileList.AyaFileListInfo mFileInfo; /// /// Clean up any resources being used. /// protected override void Dispose( bool disposing ) { if( disposing ) { // if(components != null) // { // components.Dispose(); // } } base.Dispose( disposing ); } #region Windows Form Designer generated code /// /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// private void InitializeComponent() { this.WikiFileOpenSave_Fill_Panel = new System.Windows.Forms.Panel(); this.lblFile = new System.Windows.Forms.Label(); this.btnRefresh = new System.Windows.Forms.Button(); this.btnCancel = new System.Windows.Forms.Button(); this.btnOK = new System.Windows.Forms.Button(); this.WikiFileOpenSave_Fill_Panel.SuspendLayout(); this.SuspendLayout(); // // WikiFileOpenSave_Fill_Panel // this.WikiFileOpenSave_Fill_Panel.Controls.Add(this.lblFile); this.WikiFileOpenSave_Fill_Panel.Controls.Add(this.btnRefresh); this.WikiFileOpenSave_Fill_Panel.Controls.Add(this.btnCancel); this.WikiFileOpenSave_Fill_Panel.Controls.Add(this.btnOK); this.WikiFileOpenSave_Fill_Panel.Cursor = System.Windows.Forms.Cursors.Default; this.WikiFileOpenSave_Fill_Panel.Dock = System.Windows.Forms.DockStyle.Fill; this.WikiFileOpenSave_Fill_Panel.Location = new System.Drawing.Point(0, 0); this.WikiFileOpenSave_Fill_Panel.Name = "WikiFileOpenSave_Fill_Panel"; this.WikiFileOpenSave_Fill_Panel.Size = new System.Drawing.Size(508, 201); this.WikiFileOpenSave_Fill_Panel.TabIndex = 0; // // lblFile // this.lblFile.Font = new System.Drawing.Font("Arial", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lblFile.Location = new System.Drawing.Point(12, 9); this.lblFile.Name = "lblFile"; this.lblFile.Size = new System.Drawing.Size(481, 98); this.lblFile.TabIndex = 30; this.lblFile.Text = "label1"; this.lblFile.TextAlign = System.Drawing.ContentAlignment.TopCenter; // // btnRefresh // this.btnRefresh.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.btnRefresh.DialogResult = System.Windows.Forms.DialogResult.Yes; this.btnRefresh.Image = global::AyaNova.Resource1.Open24; this.btnRefresh.Location = new System.Drawing.Point(206, 139); this.btnRefresh.Name = "btnRefresh"; this.btnRefresh.Size = new System.Drawing.Size(90, 51); this.btnRefresh.TabIndex = 29; this.btnRefresh.Click += new System.EventHandler(this.btnRefresh_Click); // // btnCancel // this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.btnCancel.Image = global::AyaNova.Resource1.Cancel24; this.btnCancel.Location = new System.Drawing.Point(10, 139); this.btnCancel.Name = "btnCancel"; this.btnCancel.Size = new System.Drawing.Size(90, 51); this.btnCancel.TabIndex = 28; this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); // // btnOK // this.btnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK; this.btnOK.Image = global::AyaNova.Resource1.SaveExit24; this.btnOK.Location = new System.Drawing.Point(403, 139); this.btnOK.Name = "btnOK"; this.btnOK.Size = new System.Drawing.Size(90, 51); this.btnOK.TabIndex = 27; this.btnOK.Click += new System.EventHandler(this.btnOK_Click); // // WikiFileOpenSave // this.AcceptButton = this.btnOK; this.AutoScaleBaseSize = new System.Drawing.Size(6, 15); this.CancelButton = this.btnCancel; this.ClientSize = new System.Drawing.Size(508, 201); this.Controls.Add(this.WikiFileOpenSave_Fill_Panel); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "WikiFileOpenSave"; this.ShowInTaskbar = false; this.Closing += new System.ComponentModel.CancelEventHandler(this.WikiFileOpenSave_Closing); this.Load += new System.EventHandler(this.WikiFileOpenSave_Load); this.WikiFileOpenSave_Fill_Panel.ResumeLayout(false); this.ResumeLayout(false); } #endregion // __ _ _ ___ ____ __ __ __ __ __ ___ ___ // / _)( )( )/ __)(_ _)/ \( \/ ) / _)/ \( \( _) // ( (_ )()( \__ \ )( ( () )) ( ( (_( () )) ) )) _) // \__) \__/ (___/ (__) \__/(_/\/\_) \__)\__/(___/(___) // #region Load / close events private void WikiFileOpenSave_Load(object sender, System.EventArgs e) { //case 1039 //log.Debug("WikiFileOpenSave_Load"); this.Icon = Resource1.AyaFiles16icon; Util.Localize(this); this.lblFile.Text = mFileInfo.LT_O_AyaFile.Display + "\r\n" + mFileInfo.LT_AyaFile_Label_FileSize; } private void WikiFileOpenSave_Closing(object sender, System.ComponentModel.CancelEventArgs e) { } #endregion private void btnCancel_Click(object sender, System.EventArgs e) { this.DialogResult=DialogResult.Cancel; this.Close(); } //SAVE FILE BUTTON private void btnOK_Click(object sender, System.EventArgs e) { this.DialogResult=DialogResult.OK; this.Close(); } //Actually this is the OPEN button private void btnRefresh_Click(object sender, EventArgs e) { this.DialogResult = DialogResult.Yes; this.Close(); } //-------------------------------------------------------- } }