/// <summary>
 /// Handle content changed event
 /// </summary>
 /// <param name="sender">sender</param>
 /// <param name="args">Always null</param>
 private void OnSegmentContentChanged(object sender, EventArgs args)
 {
     // suggestions are no longer valid when
     // user starts to modify target segment manually
     _suggestionsList.Enabled = false;
     _hasSegmentChanged       = true;
     SegmentChanged?.Invoke(this, null);
 }
Example #2
0
        private void importFileButton_Click(object sender, EventArgs e)
        {
            SegmentEditForm form = new SegmentEditForm(_game);

            form.Text += " " + SegmentID;
            if (form.ShowDialog() == DialogResult.OK)
            {
                SetSegment(form.ResultSegment);
                SegmentChanged?.Invoke(this, form.ResultSegment);
            }
        }
        private void OnSelectedSegmentChanged()
        {
            ContentView selectedSegmentView = (_firstSegmentView.Parent as Grid).Children[_selectedSegment] as ContentView;

            foreach (ContentView v in (selectedSegmentView.Parent as Grid).Children)
            {
                v.BackgroundColor = Color.Transparent;
            }

            selectedSegmentView.BackgroundColor = SelectedSegmentColor;
            SegmentChanged?.Invoke(this, new EventArgs());
        }
Example #4
0
 /// <summary>
 /// Handle content changed event
 /// </summary>
 /// <param name="sender">sender</param>
 /// <param name="args">Always null</param>
 private void OnSegmentContentChanged(object sender, EventArgs args)
 {
     _hasSegmentChanged = true;
     SegmentChanged?.Invoke(this, null);
 }
Example #5
0
 /// <summary>
 /// Called when a segmentation has been completed.
 /// </summary>
 /// <param name="index">selector for the created segment.</param>
 private void OnSegmentChange(uint index)
 {
     SegmentChanged.Invoke(index);
 }