public FeaturePropertyForm(FeatureLabel point, FeatureLabelManager mgr) { featureLabel = point; labelMgr = mgr; this.Text = "Feature"; InitializeComponent(); }
private void NotifyFeatureCommandsCollectionFinish(object sender, NotifyFeatureCommandsCollectionFinishEventArgs e) { if (e.Result.Success) { YesNo autoClose = Launcher.AutoClose; if (autoClose == YesNo.Yes) { CloseForm(); } if (UserInformationFirstLineLabel.InvokeRequired) { var d = new SafeUpdateFinishButtonDelegate(UpdateFinishButton); FeatureLabel.Invoke(d); } else { UserInformationFirstLineLabel.Visible = false; UserInformationSecondLineLabel.Visible = false; FinishButton.Visible = true; FinishButton.Refresh(); } } else { MessageBox.Show(e.Result.Errors.AsMessages().ToStringBuilder().ToString(), @"Error", MessageBoxButtons.OK); CloseForm(); } }
private void NotifyFeatureCommandCollectionExecuting(object sender, NotifyFeatureCommandCollectionExecutingEventArgs e) { string featureDataText = $"{e.Feature} ({e.Index + 1}/{e.Total})"; FeatureLabel.Text = $@"Feature: {featureDataText}"; FeatureLabel.Refresh(); }
private void NotifyFeatureCommandCollectionExecuted(object sender, NotifyFeatureCommandCollectionExecutedEventArgs e) { if (FeaturesProgressBar.InvokeRequired) { var d = new SafeUpdateProgressBarDelegate(UpdateProgressBar); FeatureLabel.Invoke(d); } else { FeaturesProgressBar.Value++; } }
private void NotifyFeatureCommandCollectionExecuting(object sender, NotifyFeatureCommandCollectionExecutingEventArgs e) { string featureDataText = $"{e.Feature} ({e.Index + 1}/{e.Total})"; if (FeatureLabel.InvokeRequired) { var d = new SafeUpdateFeatureLabelDelegate(UpdateFeatureLabel); FeatureLabel.Invoke(d, featureDataText); } else { FeatureLabel.Text = $@"Feature: {featureDataText}"; FeatureLabel.Refresh(); } }
private void UpdateFeatureLabel(string text) { FeatureLabel.Text = text; FeatureLabel.Refresh(); }
private void viewerPictureBox_MouseClick(object sender, MouseEventArgs e) { if (formState == FormState.ADD_FEATURE) { FeatureLabel feature = this.infoMgr.featureMgr.CreateLabel(); feature.pos = new Point(e.X, e.Y); FeaturePropertyForm propertyForm = new FeaturePropertyForm(feature, this.infoMgr.featureMgr); propertyForm.ShowDialog(); Refresh(); } else if (formState == FormState.ADD_INDOOR) { MouseEventArgs mouseEvent = (MouseEventArgs)e; if (mouseEvent.Button == MouseButtons.Right) { // pop to choose "complete" or "cancel" this.polygonContextMenuStrip.Show(this.Left + e.X, this.Top + e.Y); } else if (mouseEvent.Button == MouseButtons.Left) { if (this.tempIndoorLabel == null) { this.tempIndoorLabel = this.infoMgr.indoorMgr.CreateLabel(); } this.tempIndoorLabel.AddVertice(new Point(e.X, e.Y)); } Refresh(); } else if (formState == FormState.ADD_OUTDOOR) { MouseEventArgs mouseEvent = (MouseEventArgs)e; if (mouseEvent.Button == MouseButtons.Right) { // pop to choose "complete" or "cancel" this.polygonContextMenuStrip.Show(this.Left + e.X, this.Top + e.Y); } else if (mouseEvent.Button == MouseButtons.Left) { if (this.tempOutdoorLabel == null) { this.tempOutdoorLabel = this.infoMgr.outdoorMgr.CreateLabel(); } this.tempOutdoorLabel.AddVertice(new Point(e.X, e.Y)); } Refresh(); } else if (formState == FormState.ADD_ENEMY) { EnemyLabel enemy = this.infoMgr.enemyMgr.CreateLabel(); enemy.pos = new Point(e.X, e.Y); EnemyPropertyForm propertyForm = new EnemyPropertyForm(enemy, this.infoMgr.enemyMgr); propertyForm.ShowDialog(); Refresh(); } else { MouseEventArgs mouseEvent = (MouseEventArgs)e; if (mouseEvent.Button == MouseButtons.Right) { this.editContextMenuStrip.Show(this.Left + e.X, this.Top + e.Y); } Refresh(); } }