예제 #1
0
 private void PrintAllDialog_Closed(object sender, EventArgs e)
 {
     if (formLayout == null)
     {
         return;
     }
     formLayout.Option("Width").Value  = Width;
     formLayout.Option("Height").Value = Height;
     formLayout.Save();
 }
 private void urlBrowseDialog_DialogEvent(object source, DialogEventArgs e)
 {
     formOpen = false;
     if (e.Dialog.Text == Environment.StringResources.GetString("Control_TransactionControl_Message1"))
     {
         crFolder.Option("Width").Value  = e.Dialog.Width;
         crFolder.Option("Height").Value = e.Dialog.Height;
         crFolder.Save();
     }
     else
     {
         transFolder.Option("Width").Value  = e.Dialog.Width;
         transFolder.Option("Height").Value = e.Dialog.Height;
         transFolder.Save();
     }
     if (docID.Equals(e.Dialog.Tag))
     {
         LoadTransaction(docID);
     }
 }
예제 #3
0
        private void SelectDocUniversalDialog_Closed(object sender, EventArgs e)
        {
            try
            {
                if (docGrid != null && docGrid.IsFine)
                {
                    foreach (DataGridViewColumn column in docGrid.Columns)
                    {
                        docGrid.OptionFolder.OptionForced <int>(column.Name).Value = column.Width;
                    }

                    docGrid.OptionFolder.OptionForced <string>("Сортировка").Value = docGrid.GetDataView().Sort;
                    docGrid.OptionFolder.Save();
                }

                if (options != null)
                {
                    bool maximized = (WindowState == FormWindowState.Maximized);
                    options.OptionForced <string>("Maximized").Value = maximized.ToString();

                    if (!maximized)
                    {
                        options.OptionForced <int>("Left").Value   = this.Left;
                        options.OptionForced <int>("Top").Value    = this.Top;
                        options.OptionForced <int>("Width").Value  = this.Width;
                        options.OptionForced <int>("Height").Value = this.Height;
                    }

                    options.OptionForced <int>("PanelTopHeight").Value     = panelTop.Height;
                    options.OptionForced <int>("PanelLeftWidth").Value     = panelLeft.Width;
                    options.OptionForced <int>("GroupPersonsHeight").Value = groupPersons.Height;
                    options.OptionForced <string>("ZoomString").Value      = docControl.ZoomText;
                    options.OptionForced <string>("ShowThumb").Value       = docControl.ShowThumbPanel.ToString();

                    options.Save();
                }
            }
            catch
            {
            }
        }