예제 #1
0
        private void OnoptionsToolStripMenuItem_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {
            e.ClickedItem.OwnerItem.Owner.Hide();
            switch (e.ClickedItem.Name)
            {
            case "itemConvertToGrid25":
                var cgf = ConvertToGrid25Form.GetInstance();
                cgf.MapLayer = _mapLayersHandler.CurrentMapLayer;
                if (!cgf.Visible)
                {
                    cgf.Show(this);
                }
                else
                {
                    cgf.BringToFront();
                }

                break;

            case "itemAlwaysKeepOnTop":
                if (_mapLayersHandler.CurrentMapLayer != null)
                {
                    ToolStripMenuItem tsmi = (ToolStripMenuItem)e.ClickedItem;
                    tsmi.Checked = !tsmi.Checked;
                    _mapLayersHandler.CurrentMapLayer.KeepOnTop = tsmi.Checked;
                }
                break;
            }
        }
예제 #2
0
 public static ConvertToGrid25Form GetInstance()
 {
     if (_instance == null)
     {
         _instance = new ConvertToGrid25Form();
     }
     return(_instance);
 }
예제 #3
0
 private void OnConvertToGrid25Form_FormClosed(object sender, FormClosedEventArgs e)
 {
     _instance = null;
     global.SaveFormSettings(this);
 }