public AddMenu(MainControler mainControler) : base() { newLayerMenuItem = new MenuItem(); newLayerMenuItem.Text = "Layer hinzufügen..."; newLayerMenuItem.Click += new System.EventHandler(menuItemClick); this.MenuItems.Add(newLayerMenuItem); newGeoImageMenuItem = new MenuItem(); newGeoImageMenuItem.Text = "Geo-Bild hinzufügen..."; newGeoImageMenuItem.Click += new System.EventHandler(menuItemClick); this.MenuItems.Add(newGeoImageMenuItem); newMandelbrotMenuItem = new MenuItem(); newMandelbrotMenuItem.Text = "Mandelbrot hinzufügen..."; newMandelbrotMenuItem.Click += new System.EventHandler(menuItemClick); #if DEVELOP newOGRLayer = new MenuItem(); newOGRLayer.Text = "OGR Layer hinzufügen..."; newOGRLayer.Click += new System.EventHandler(menuItemClick); this.MenuItems.Add(newOGRLayer); #endif newMapServerLayer = new MenuItem(); newMapServerLayer.Text = "WMS-Layer hinzufügen..."; newMapServerLayer.Click += new System.EventHandler(menuItemClick); this.MenuItems.Add(newMapServerLayer); this._mainControler = mainControler; this._mainControler.SettingsLoaded += new MainControler.SettingsLoadedDelegate(MainControler_SettingsLoaded); }
/// <summary> /// Create a new instance of the FolderBrowserDialog /// </summary> public FolderBrowserForm(MainControler mainControler) { // // TODO: Add constructor logic here // InitializeComponent(); //add folder images to imagelist if (mainControler.DisplayResolution == DisplayResolution.VGA) this.ilIcons.ImageSize = new System.Drawing.Size(32, 32); ilIcons.Images.Add(ToolbarMaker.GetIconFromFile(mainControler.Config.ApplicationDirectory + @"\Icons\Folder")); //ilIcons.Images.Add(new System.Drawing.Bitmap(System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("OpenNETCF.Windows.Forms.Images.Device.gif"))); //ilIcons.Images.Add(new System.Drawing.Bitmap(System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("OpenNETCF.Windows.Forms.Images.Card.gif"))); //set default image index to 0 tvFolders.ImageIndex = 0; tvFolders.SelectedImageIndex = 0; //use a backslash between path levels tvFolders.PathSeparator = "\\"; //setup default tree Reset(); }
internal void Change() { // in yet in change mode if (_currentChangeMode == E_ChangeMode.no_change) { // check if changing is possible and switch controls _currentChangeMode = DoChange(); // switch label if changing possible if (_currentChangeMode != E_ChangeMode.no_change) { Window.Location_ChangeButton.Content = "Save"; } } else { // re-enable controls again ResetControlState(); // save the changes to the database SaveChangeChanges(); // ask maincontroler to reload data from database and refresh all controls // maincontroler needs to take care of this since it not only settings tab MainControler.ReloadAndRefreshControls(); // reset the modes _currentChangeMode = E_ChangeMode.no_change; } }
/// <summary> /// Create a new instance of the FolderBrowserDialog /// </summary> public FolderBrowserForm(MainControler mainControler) { // // TODO: Add constructor logic here // InitializeComponent(); //add folder images to imagelist if (mainControler.DisplayResolution == DisplayResolution.VGA) { this.ilIcons.ImageSize = new System.Drawing.Size(32, 32); } ilIcons.Images.Add(ToolbarMaker.GetIconFromFile(mainControler.Config.ApplicationDirectory + @"\Icons\Folder")); //ilIcons.Images.Add(new System.Drawing.Bitmap(System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("OpenNETCF.Windows.Forms.Images.Device.gif"))); //ilIcons.Images.Add(new System.Drawing.Bitmap(System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("OpenNETCF.Windows.Forms.Images.Card.gif"))); //set default image index to 0 tvFolders.ImageIndex = 0; tvFolders.SelectedImageIndex = 0; //use a backslash between path levels tvFolders.PathSeparator = "\\"; //setup default tree Reset(); }
public SaveDialog(Rectangle visibleRect, MainControler mainControler) : this() { this.mainControler = mainControler; this.Location = new System.Drawing.Point((visibleRect.Width - this.Width) / 2, (visibleRect.Height - this.Height) / 2 + visibleRect.Y); }
public OverrideDialog(Rectangle visibleRect, MainControler mainControler) : this() { this.mainControler = mainControler; this.Location = new System.Drawing.Point((visibleRect.Width - this.Width) / 2, (visibleRect.Height - this.Height) / 2 + visibleRect.Y); }
//private Utilities.HookKeys keysHook; //private bool notFirstCallBack = false; public MainForm(MainControler mainControler, Config config, string appName) { InitializeComponent(); this.Text = appName; this.mainControler = mainControler; statusTimer.Enabled = false; statusTimer.Tick += new EventHandler(StatusTimerEvent); mainControler.LayerManager.FirstLayerAdded += new LayerManager.LayerAddedDelegate(LayerManager_FirstLayerAdded); mainControler.LayerManager.LayerAdded += new LayerManager.LayerAddedDelegate(layerAdded); mainControler.LayerManager.LayerChanged += new LayerManager.LayerChangedDelegate(LayerManager_LayerChanged); mainControler.SettingsLoaded += new MainControler.SettingsLoadedDelegate(mainControler_SettingsLoaded); this.config = config; // Menus toolMenu = new ToolMenu(this); drawMenu = new DrawMenu(this); fileMenu = new FileMenu(mainControler); addMenu = new AddMenu(mainControler); undoMenu = new UndoMenu(mainControler); this.layerListView.ContextMenu = new LayerMenu(this); ToolbarMaker.DisplayResolution = mainControler.DisplayResolution; //this.keysHook = new GravurGIS.Utilities.HookKeys(); //this.keysHook.HookEvent += new HookKeys.HookEventHandler(keysHook_HookEvent); //this.keysHook.Start(); }
internal virtual void Edit() { // currently in "add" mode... if (_currentMode == E_Mode.add) { // check if editing is possible and switch controls CurrentEditMode = DoEdit(); // edit is possible if (CurrentEditMode != E_EditMode.no_edit) { // update button state / label UpdateButtons(); // switch to edit mode _currentMode = E_Mode.edit; } } else { // set control state ResetControlState(); // save the changes to the database SaveEditChanges(); // ask maincontroler to reload data from database and refresh all controls // maincontroler needs to take care of this since it not only settings tab MainControler.ReloadAndRefreshControls(); // reset the modes _currentMode = E_Mode.add; CurrentEditMode = E_EditMode.no_edit; } }
/// <summary> /// Constructor for Drawing PolyLines and Polygons /// </summary> /// <param name="layerType"></param> /// <param name="x"></param> /// <param name="y"></param> /// <param name="bEditingStarted"></param> /// <param name="mainControler"></param> public DrawAction(LayerType layerType, double x, double y, bool bEditingStarted, MainControler mainControler) { this.layerType = layerType; this.mainControler = mainControler; this.x = x; this.y = y; this.bEditingStarted = bEditingStarted; }
public FinishTrackingDialog(MainControler mc, Rectangle visibleRect, int nrTrackedPoints) : this(mc) { this.Location = new System.Drawing.Point((visibleRect.Width - this.Width) / 2, (visibleRect.Height - this.Height) / 2 + visibleRect.Y); rbInterpretAsPoints.Enabled = (nrTrackedPoints > 0); rbInterpretAsPolyline.Enabled = (nrTrackedPoints > 1); rbInterpretAsPolygon.Enabled = (nrTrackedPoints > 2); }
public CoordCalculator(MainControler mainControler) { GDALCoordTransformer = GetNewCoordTransformer(); if (GDALCoordTransformer == IntPtr.Zero) { MessageBox.Show("Fehler 0x4122: Konnte Koordinaten Transformer nicht erstellen."); } mainControler.SettingsLoaded += new MainControler.SettingsLoadedDelegate(mainControler_SettingsLoaded); }
public ImageSettingEditor(Rectangle visibleRect, MainControler mainControler) : this() { this.config = mainControler.Config; this.Location = new System.Drawing.Point(0, visibleRect.Y); this.ClientSize = new System.Drawing.Size(visibleRect.Width, visibleRect.Height); this.layerTabControl.Height = this.ClientSize.Height - Caption.Height - 3; this.panel1.Height = layerTabControl.Height; this.mainControler = mainControler; }
/// <summary> /// /// Constructor for Drawing Points /// </summary> /// <param name="absoluteZoom"></param> /// <param name="x"></param> /// <param name="y"></param> /// <param name="mainControler"></param> public DrawAction(double absoluteZoom, double x, double y, MainControler mainControler) { this.layerType = LayerType.PointCanvas; this.mainControler = mainControler; this.absoluteZoom = absoluteZoom; this.x = x; this.y = y; this.shpInfo.iShapeInf = null; this.shpInfo.quadTreePosItemInf = null; this.Comment = String.Empty; this.Category = String.Empty; }
/// <summary> /// /// </summary> /// <param name="oldAbsoluteZoom"></param> /// <param name="oldD">old dx and dy</param> /// <param name="d">new dx and dy</param> /// <param name="dpiX">number of display pixels horizontically</param> /// <param name="dpiY">number of display pixels vertically</param> /// <param name="absoluteZoom"></param> /// <param name="unscaledP">actual click point in GK coordinates</param> /// <param name="mainControler"></param> public ZoomAction(double oldAbsoluteZoom, PointD oldD, PointD d, double absoluteZoom, PointD unscaledP, double maxAbsoluteZoom, MainControler mainControler) { this.oldAbsoluteZoom = oldAbsoluteZoom; this.oldD = oldD; this.mainControler = mainControler; this.absoluteZoom = absoluteZoom; this.d = d; this.firstScale = mainControler.LayerManager.FirstScale; this.unscaledP = unscaledP; this.maxAbsZoom = maxAbsoluteZoom; }
public EventForm(MainControler mc, MainWindow mw) { InitializeComponent(); eventList.Items.AddRange(new object[] { "Drought", "Earthquake", "Fire", "Flood", "Wind" }); eventList.SelectedItem = "Drought"; eventList.DropDownStyle = ComboBoxStyle.DropDownList; XTextBox.Text = "0"; YTextBox.Text = "0"; powerTextBox.Text = "100"; p = new MapObjects.Point(0, 0); this.mc = mc; this.mw = mw; }
public UndoMenu(MainControler mainControler) : base() { undoItem = new MenuItem(); undoItem.Text = "Rückgängig"; undoItem.Click += new System.EventHandler(menuItemClick); this.MenuItems.Add(undoItem); redoItem = new MenuItem(); redoItem.Text = "Wiederherstellen"; redoItem.Click += new System.EventHandler(menuItemClick); this.MenuItems.Add(redoItem); this.mainControler = mainControler; }
// Use this for initialization void Start() { if (instance == null) { instance = this; } foreach (var item in mainUI.nodeCtrs) { StartCoroutine(item.initialization()); } SetState(AppState.Looker); }
public MapServerSettings(Rectangle visibleRect, MainControler mainControler) : this() { this.config = mainControler.Config; this.tbUpdateData = new System.Windows.Forms.ToolBarButton(); this.toolBar.Buttons.Add(this.tbUpdateData); ToolbarMaker.AddIcon(config.ApplicationDirectory + @"\Icons\update"); this.Location = new System.Drawing.Point(0, visibleRect.Y); this.ClientSize = new System.Drawing.Size(visibleRect.Width, visibleRect.Height); this.layerTabControl.Height = this.ClientSize.Height - Caption.Height - 3; this.panel1.Height = layerTabControl.Height; this.mainControler = mainControler; this.config = mainControler.Config; this.availLayersView.ContextMenu = new MsLayerMenu(this); }
public CommentDialog(MainControler mainControler) { // // Required for Windows Form Designer support // InitializeComponent(); saveButton.DialogResult = DialogResult.OK; cancelButton.DialogResult = DialogResult.Cancel; List<String> cats = mainControler.Config.CategoryList; for (int i = 0; i < cats.Count; i++) { comboBox1.Items.Add(cats[i]); } //this.comboBox1.DisplayMember = this.comboBox1.ValueMember = ""; }
public CommentDialog(MainControler mainControler) { // // Required for Windows Form Designer support // InitializeComponent(); saveButton.DialogResult = DialogResult.OK; cancelButton.DialogResult = DialogResult.Cancel; List <String> cats = mainControler.Config.CategoryList; for (int i = 0; i < cats.Count; i++) { comboBox1.Items.Add(cats[i]); } //this.comboBox1.DisplayMember = this.comboBox1.ValueMember = ""; }
public MainWindow() { mc = new MainControler(); InitializeComponent(); gamePanel.Paint += new PaintEventHandler(GamePanel_Paint); trackBar1 = new TrackBar(); Controls.AddRange(new Control[] { trackBar1 }); trackBar1.Location = new System.Drawing.Point(760, 80); trackBar1.Size = new Size(100, 45); trackBar1.Scroll += new EventHandler(TrackBar1_Scroll); trackBar1.Minimum = 0; trackBar1.Maximum = 11; trackBar1.TickFrequency = 1; trackBar1.LargeChange = 2; trackBar1.SmallChange = 1; trackBar1.Enabled = false; FormBorderStyle = FormBorderStyle.FixedSingle; MaximizeBox = false; label2.Text = DateTime.Now.ToString("dd.MM.yyyy"); }
public GPSLayer(MainControler mainControler) { this._layerType = LayerType.GPSPosition; // GPS init this.mainControler = mainControler; this.config = mainControler.Config; this.gpsTimer = new System.Threading.Timer(updateSceen, null, 0, config.GPSUpdateInterval); updateDataHandler = new EventHandler(UpdateData); updateStatusHandler = new EventHandler(UpdateStatus); mainControler.GpsControler.DeviceStateChanged += new DeviceStateChangedEventHandler(gps_DeviceStateChanged); mainControler.GpsControler.LocationChanged += new LocationChangedEventHandler(gps_LocationChanged); mainControler.SettingsLoaded += new MainControler.SettingsLoadedDelegate(mainControler_SettingsLoaded); this.mainControler.createNewCanvas(0, 0, 1.0); // make sure there are initialized values in gk.h_value = 0.0; gk.r_value = 0.0; oldGk = gk; }
public Navigator(Rectangle visibleRect, MainControler mainControler) : this() { this.mainControler = mainControler; this.Location = new System.Drawing.Point((visibleRect.Width - this.Width) / 2, (visibleRect.Height - this.Height) / 2 + visibleRect.Y); this.cbScale.NumbersOnly = true; fillDialogWithData(); // add addtional data this.cbScale.Items.Add("5.000"); this.cbScale.Items.Add("10.000"); this.cbScale.Items.Add("25.000"); this.cbScale.Items.Add("100.000"); this.cbScale.Items.Add("250.000"); this.cbScale.Items.Add("500.000"); this.cbScale.Items.Add("750.000"); this.cbScale.Items.Add("1.000.000"); this.cbScale.Items.Add("2.500.000"); this.cbScale.Items.Add("5.000.000"); }
internal void Add() { // if the autocomplete textboxes are not left via TAB but by clicking directly on a button, // the display item is not udpated - so do this here as a workaround UpdateDisplayItem(); // db operations might take a while Mouse.OverrideCursor = System.Windows.Input.Cursors.Wait; // add country to database PersistenceManager.E_DBReturnCode success = DataAccessAdapter.SmartAddCountry(DisplayItem, out string errorMessage); // show success or error message EvaluateDatabaseMessages(success, errorMessage); // reload data from database and refresh controls MainControler.ReloadAndRefreshControls(); // reset cursor Mouse.OverrideCursor = null; Window.Settings_CountryControl.SetFocus(); }
internal void Delete() { SettingsDeleteWindow deletingWindow = new SettingsDeleteWindow(Window); if (deletingWindow.ShowDialog() == true) { switch (deletingWindow.DeleteTarget) { case SettingsDeleteWindow.EDeleteTarget.Country: var country = Window.Settings_CountryControl.GetCurrentObject() as Country; if (country != null) { if (DataAccessAdapter.DeleteCountryById(country.Id, out string errorMessage) == PersistenceManager.E_DBReturnCode.no_error) { MainControler.ReloadAndRefreshControls(); ShowMessage("Country sucessfully deleted.", E_MessageType.info); } else { ShowMessage("Error deleting the country." + errorMessage, E_MessageType.error); } } RefreshAllObjectsFromDB(); break; case SettingsDeleteWindow.EDeleteTarget.Area: var area = Window.Settings_AreaControl.GetCurrentObject() as Area; if (area != null) { if (DataAccessAdapter.DeleteAreaById(area.Id, out string errorMessage) == PersistenceManager.E_DBReturnCode.no_error) { MainControler.ReloadAndRefreshControls(); ShowMessage("Area sucessfully deleted.", E_MessageType.info); } else { ShowMessage("Error deleting the area." + errorMessage, E_MessageType.error); } } break; case SettingsDeleteWindow.EDeleteTarget.Subarea: var subArea = Window.Settings_SubAreaControl.GetCurrentObject() as SubArea; if (subArea != null) { if (DataAccessAdapter.DeleteSubAreaById(subArea.Id, out string errorMessage) == PersistenceManager.E_DBReturnCode.no_error) { MainControler.ReloadAndRefreshControls(); ShowMessage("Subarea sucessfully deleted.", E_MessageType.info); } else { ShowMessage("Error deleting the Subarea." + errorMessage, E_MessageType.error); } } break; case SettingsDeleteWindow.EDeleteTarget.None: // nothing to delete break; default: System.Diagnostics.Debug.Assert(false); throw new Exception("Unknonw enum value in SettingTabControler::Delete"); } } }
public static LayerSettingEditor Instance(Rectangle visibleRect, MainControler mainControler) { if (reference == null) reference = new LayerSettingEditor(visibleRect, mainControler); return reference; }
void Awake() {//单例模式 instance = this; detector = new DefaultDetecter(); }
private LayerSettingEditor(Rectangle visibleRect, MainControler mainControler) : this() { this.config = mainControler.Config; this.Location = new System.Drawing.Point(0, visibleRect.Y); this.ClientSize = new System.Drawing.Size(visibleRect.Width, visibleRect.Height); this.layerTabControl.Height = this.ClientSize.Height - Caption.Height - 3; this.panel1.Height = layerTabControl.Height; this.mainControler = mainControler; this.tLine = mainControler.LayerManager.TransportPolylineLayer; this.tPoint = mainControler.LayerManager.TransportPointLayer; this.tPolygon = mainControler.LayerManager.TransportPolygonLayer; this.config = mainControler.Config; }
static void Main(string[] args) { MainControler.Execute(); }
public CommentDialog(MainControler mc, Rectangle visibleRect) : this(mc) { this.Location = new System.Drawing.Point((visibleRect.Width - this.Width) / 2, (visibleRect.Height - this.Height) / 2 + visibleRect.Y); }
static void Main() { startTicks = Environment.TickCount; // make sure only one instance exists using (AppExecutionManager execMgr = new AppExecutionManager(appName)) { if (execMgr.IsFirstInstance) { // Set the maximum allowed amount of connections up // This is needed for MapServer and other outgoing connections // since the garbage collector is not that fast ServicePointManager.DefaultConnectionLimit = 100; MainControler mainController = null; try { // create a notify icon notifyIcon = new Utilities.NotifyIcon(); // load the application icon (Resource ID 32512) IntPtr hIcon = Win32.LoadIcon(Win32.GetModuleHandle(null), "#32512"); // add the Icon to the systray notifyIcon.Add(hIcon); mainController = new MainControler(appName); } catch (Exception e) { logException(e); MessageBox.Show(String.Format("Es trat ein Fehler beim Laden der Anwendung auf.{0}Nachricht: {1}", Environment.NewLine, e.Message), "Fehler"); notifyIcon.Remove(); execMgr.Dispose(); } try { Application.Run(mainController.MainForm); } catch (Exception e) { string logfile = logException(e); MessageBox.Show(String.Format("Es trat leider ein Programmfehler auf.{0}Nachricht: {1}{0}Log: {2}", Environment.NewLine, e.Message, logfile), "Fehler"); } finally { notifyIcon.Remove(); execMgr.Dispose(); } } else { try { if (!execMgr.ActivateFirstInstance()) { MessageBox.Show( String.Format("Es kann nur eine Programm-Instanz von {0} ausgeführt werden.\nDie bereits laufende Instanz konnte jedoch leider nicht aktiviert werden.", appName), "Hinweis", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1); } } catch (Exception ex) { MessageBox.Show("Es läuft bereits eine Instanz von GravurGIS. Es konnt diese jedoch nicht aktiviert werden, da folgender Fehler auftrat: " + ex.Message); } } } }
/// <summary> /// Initializes a new instance of the OpenNETCF.Windows.Forms.FolderBrowserDialog class. /// </summary> public FolderBrowserDialog(MainControler mc) { m_dialog = new FolderBrowserForm(mc); }
public FileMenu(MainControler mainControler) : base() { // Das Öffnen-Menu openMenuItem = new MenuItem(); openMenuItem.Text = "Öffnen"; this.MenuItems.Add(openMenuItem); openProjectMenuItem = new MenuItem(); openProjectMenuItem.Text = "Projekt"; openProjectMenuItem.Click += new System.EventHandler(menuItemClick); openMenuItem.MenuItems.Add(openProjectMenuItem); openTransportMenuItem = new MenuItem(); openTransportMenuItem.Text = "Austauschlayer"; openTransportMenuItem.Click += new System.EventHandler(menuItemClick); openTransportMenuItem.Enabled = false; openMenuItem.MenuItems.Add(openTransportMenuItem); // Das Importieren-Menu importMenuItem = new MenuItem(); importMenuItem.Text = "Importieren"; this.MenuItems.Add(importMenuItem); importProjectMenuItem = new MenuItem(); importProjectMenuItem.Text = "Projekt"; importProjectMenuItem.Click += new System.EventHandler(menuItemClick); importMenuItem.MenuItems.Add(importProjectMenuItem); importTransportMenuItem = new MenuItem(); importTransportMenuItem.Text = "Austauschlayer"; importTransportMenuItem.Click += new System.EventHandler(menuItemClick); importTransportMenuItem.Enabled = false; importMenuItem.MenuItems.Add(importTransportMenuItem); // Das Speichern-Menu saveMenuItem = new MenuItem(); saveMenuItem.Text = "Speichern"; saveMenuItem.Click += new System.EventHandler(menuItemClick); this.MenuItems.Add(saveMenuItem); saveAsMenuItem = new MenuItem(); saveAsMenuItem.Text = "Speichern unter..."; saveAsMenuItem.Click += new System.EventHandler(menuItemClick); this.MenuItems.Add(saveAsMenuItem); MenuItem separator1 = new MenuItem(); separator1.Text = "-"; this.MenuItems.Add(separator1); settingsMenuItem = new MenuItem(); settingsMenuItem.Text = "Einstellungen"; settingsMenuItem.Click += new System.EventHandler(menuItemClick); this.MenuItems.Add(settingsMenuItem); loadDefaultSettingsMenuItem = new MenuItem(); loadDefaultSettingsMenuItem.Text = "Standardeinstellungen laden"; loadDefaultSettingsMenuItem.Click += new System.EventHandler(menuItemClick); this.MenuItems.Add(loadDefaultSettingsMenuItem); MenuItem separator2 = new MenuItem(); separator2.Text = "-"; this.MenuItems.Add(separator2); #if DEVELOP stressTest = new MenuItem(); stressTest.Text = "Stresstest"; stressTest.Click += new EventHandler(menuItemClick); this.MenuItems.Add(stressTest); #endif programMenuItem = new MenuItem(); programMenuItem.Text = "Programm"; this.MenuItems.Add(programMenuItem); aboutMenuItem = new MenuItem(); aboutMenuItem.Text = "Über..."; aboutMenuItem.Click += new System.EventHandler(menuItemClick); programMenuItem.MenuItems.Add(aboutMenuItem); MenuItem separator3 = new MenuItem(); separator3.Text = "-"; programMenuItem.MenuItems.Add(separator3); closeMenuItem = new MenuItem(); closeMenuItem.Text = "Beenden"; closeMenuItem.Click += new System.EventHandler(menuItemClick); programMenuItem.MenuItems.Add(closeMenuItem); this.mainControler = mainControler; mainControler.LayerManager.FirstLayerAdded += new LayerManager.LayerAddedDelegate(LayerManager_FirstLayerAdded); }
public DrawAction(LayerType layerType, double x, double y, bool bEditingStarted, MainControler mainControler, String Comment, String Category) : this(layerType, x, y, bEditingStarted, mainControler) { this.Comment = Comment; this.Category = Category; }
public SettingDialog(Rectangle visibleRect, MainControler mainControler) : this() { this.config = mainControler.Config; this.Location = new System.Drawing.Point(0, visibleRect.Y); this.ClientSize = new System.Drawing.Size(visibleRect.Width, visibleRect.Height); this.layerTabControl.Height = this.ClientSize.Height - Caption.Height - 3; this.panel1.Height = layerTabControl.Height; resizeToRect(visibleRect); this.mainControler = mainControler; this.tLine = mainControler.LayerManager.TransportPolylineLayer; this.tPoint = mainControler.LayerManager.TransportPointLayer; this.tPolygon = mainControler.LayerManager.TransportPolygonLayer; this.config = mainControler.Config; PointLayerSettings.Icon = ToolbarMaker.GetIconFromFile(config.ApplicationDirectory + @"\Icons\tbSettings"); PointLayerFile.Icon = ToolbarMaker.GetIconFromFile(config.ApplicationDirectory + @"\Icons\tbOpen"); PolylineLayerSettings.Icon = ToolbarMaker.GetIconFromFile(config.ApplicationDirectory + @"\Icons\tbSettings"); PolyLineLayerFile.Icon = ToolbarMaker.GetIconFromFile(config.ApplicationDirectory + @"\Icons\tbOpen"); PolygonLayerSettings.Icon = ToolbarMaker.GetIconFromFile(config.ApplicationDirectory + @"\Icons\tbSettings"); PolygonLayerFile.Icon = ToolbarMaker.GetIconFromFile(config.ApplicationDirectory + @"\Icons\tbOpen"); bAddCategory.Icon = addDirIconBox.Icon = ToolbarMaker.GetIconFromFile(config.ApplicationDirectory + @"\Icons\plus"); bRemoveCategory.Icon = removeDirIconBox.Icon = ToolbarMaker.GetIconFromFile(config.ApplicationDirectory + @"\Icons\minus"); stOpenIconBox.Icon = ToolbarMaker.GetIconFromFile(config.ApplicationDirectory + @"\Icons\tbOpen"); PointLayerSettings.Normal_BackColor = PolylineLayerSettings.Normal_BackColor = PolygonLayerSettings.Normal_BackColor = PointLayerFile.Normal_BackColor = PolyLineLayerFile.Normal_BackColor = PolygonLayerFile.Normal_BackColor = addDirIconBox.Normal_BackColor = removeDirIconBox.Normal_BackColor = stOpenIconBox.Normal_BackColor = bAddCategory.Normal_BackColor = bRemoveCategory.Normal_BackColor = settingDefaultProjectTB.BackColor = SystemColors.Window; if (mainControler.DisplayResolution != DisplayResolution.QVGA) { this.addDirIconBox.Location = new Point(addDirIconBox.Location.X - 3, addDirIconBox.Location.Y - 4); this.removeDirIconBox.Location = new Point(this.removeDirIconBox.Location.X - 3, this.removeDirIconBox.Location.Y + 8); this.settingsSearchDirListbox.Size = new Size(settingsSearchDirListbox.Size.Width, settingsSearchDirListbox.Height + 4); this.bAddCategory.Location = new Point(bAddCategory.Location.X - 3, bAddCategory.Location.Y - 4); this.bRemoveCategory.Location = new Point(this.bRemoveCategory.Location.X - 3, this.bRemoveCategory.Location.Y + 8); this.lbCategories.Size = new Size(lbCategories.Size.Width, lbCategories.Height + 4); } if (config.GpsViewMode == GpsView.StaticMap) gpsViewSelection.SelectedItem = gpsViewSelection.Items[0]; else gpsViewSelection.SelectedItem = gpsViewSelection.Items[1]; }
public PropertyEditor(MainControler mainControler) { this.mainControler = mainControler; }