Esempio n. 1
0
 private void MainForm_Load(object sender, System.EventArgs e)
 {
     try
     {
         if (!base.DesignMode)
         {
             toolStripContainer.Height = 26;
             FixLayout(toolStripContainer.TopToolStripPanel);
             GmApplication.Initialize(this);
             dlgOpenFile.InitialDirectory = PathUtils.BaseDirectory + "Data";
             dlgOpenFile.Filter           = FileFilter.VectorFilter;
             string[] ss2 = { FileFilter.wdr };
             dlgSaveFile.Filter = FileFilter.GetString(ss2);
             // this.tcLeftTop.SelectedTab=this.tpBackground;//ms bug fix
             // this.tcLeftTop.SelectedTab=this.tpTypes;//ms bug fix
             InitLibControls();
             splashForm.Close();
             splashForm.Dispose();
             splashForm      = null;
             miDebug.Visible = App.Config.debug > 0;
             dockPanel.ActiveDocumentChanged += new EventHandler(dockPanel_ActiveDocumentChanged);
         }
     }
     catch (Exception ex)
     {
         Log.Exception(ex);
     }
 }
Esempio n. 2
0
 private void NameForm_Load(object sender, System.EventArgs e)
 {
     GmApplication.Initialize(this);
     UpdateControls();
     MinimumSize = Size;
     MaximumSize = new Size(GConfig.Instance.geometry.maxFormWidth, Size.Height);
 }
Esempio n. 3
0
 private void TileForm_Load(object sender, EventArgs e)
 {
     if (!DesignMode)
     {
         GmApplication.Initialize(this);
     }
 }
Esempio n. 4
0
 private void PaletteForm_Load(object sender, EventArgs e)
 {
     if (!DesignMode)
     {
         try
         {
             GmApplication.Initialize(this);
             MinimumSize        = Size;
             lblImagePath.Text  = "";
             lblColor.BackColor = Color.Empty;
             tbPaletteName.Text = palette.name;
             foreach (NamedColor nc in palette.colors)
             {
                 AddColor(nc);
             }
             if (File.Exists(palette.imageFilePath))
             {
                 LoadImage(palette.imageFilePath);
             }
             UpdateControls();
             SetSorting(SortMode.Custom);
         }
         catch (Exception ex)
         {
             Log.Exception(ex);
         }
     }
 }
Esempio n. 5
0
 private void ChangeImage_Load(object sender, EventArgs e)
 {
     if (!DesignMode)
     {
         GmApplication.Initialize(this);
         sbText.Text   = "";
         sbCoords.Text = "";
     }
 }
Esempio n. 6
0
 private void ScalesForm_Load(object sender, System.EventArgs e)
 {
     GmApplication.Initialize(this);
     foreach (int scale in scales)
     {
         listBox.Items.Add(scale);
     }
     UpdateControls();
     MinimumSize = Size;
 }
Esempio n. 7
0
        private void ColorFromImageForm_Load(object sender, EventArgs e)
        {
            GmApplication.Initialize(this);
            MinimumSize       = Size;
            lblImagePath.Text = "";

/*			if (File.Exists(palette.imageFilePath))
 *                      {
 *                              LoadImage(palette.imageFilePath);
 *                      }*/
        }
Esempio n. 8
0
        private void PrintingMode_Load(object sender, EventArgs e)
        {
            if (!DesignMode)
            {
                GmApplication.Initialize(this);

                Config c = App.Config;

                this.textBoxMB.Text        = c.MatrixBevel.ToString();
                this.textBoxMRS.Text       = c.MatrixRealSize.ToString();
                this.checkBoxLP.Checked    = c.printTileColorMode;
                this.buttonColor.BackColor = c.MatrixLineColor;
            }
        }
Esempio n. 9
0
 private void ColorsForm_Load(object sender, EventArgs e)
 {
     GmApplication.Initialize(this);
     MinimumSize = Size;
     if (colors.Count > 0)
     {
         foreach (NamedColor nc in colors)
         {
             AddColor(nc);
         }
     }
     SetSorting(SortMode.Name);
     UpdateColor();
     UpdateControls();
 }
Esempio n. 10
0
 private void TypeForm_Load(object sender, System.EventArgs e)
 {
     try
     {
         GmApplication.Initialize(this);
         btnOk.Enabled = false;
         foreach (GeomType gt in Enum.GetValues(typeof(GeomType)))
         {
             string       s   = GeoLib.GeoLibUtils.GetLocalizedName(gt);
             ListViewItem lvi = lvTypes.Items.Add(s);
             lvi.Tag = gt;
         }
         Resize();
     }
     catch (Exception ex)
     {
         Log.Exception(ex);
     }
     this.MinimumSize = this.Size;
 }
Esempio n. 11
0
 private void MainForm_Load(object sender, EventArgs e)
 {
     if (!DesignMode)
     {
         GmApplication.Initialize(this);
         MinimumSize  = Size;
         App.MainForm = this;
         dlgOpenFile.InitialDirectory = PathUtils.BaseDirectory;
         nudPannoWidth.Value          = App.Config.pannoWidth / 10;
         nudPannoHeight.Value         = App.Config.pannoHeight / 10;
         nudTileWidth.Value           = App.Config.tileWidth / 10;
         nudTileHeight.Value          = App.Config.tileHeight / 10;
         nudGap.Value           = (decimal)0.1 * App.Config.gap;
         chkSquare.Checked      = App.Config.tileWidth == App.Config.tileHeight;
         lblGapColor.BackColor  = App.Config.gapColor;
         lblGridColor.BackColor = App.Config.gridColor;
         nudMX.Value            = App.Config.mx;
         nudMY.Value            = App.Config.my;
         UpdatePalettesListBox();
     }
 }
Esempio n. 12
0
 private void MosaicForm_Load(object sender, EventArgs e)
 {
     if (!DesignMode)
     {
         try
         {
             GmApplication.Initialize(this);
             CreateMosaic();
             foreach (NamedColor nc in palette.colors)
             {
                 AddColor(nc);
             }
             UpdateListViewCount();
             SetSorting(SortMode.Custom);
             UpdateScaleCombo();
             UpdateControls();
         }
         catch (Exception ex)
         {
             Log.Exception(ex);
         }
     }
 }