Example #1
0
    /// <summary>
    /// Closes the current open panel by destroying the gameObject.
    /// This also unsubscribes from the OnConverted event to prevent
    /// erroneous events and prepare for garbage collection.
    /// </summary>
    private void CloseOpenPanel()
    {
        var openPanel = converterPanel.GetComponentInChildren <ConverterPanel>();

        if (openPanel != null)
        {
            openPanel.Converted -= OnConverted;
            Destroy(openPanel.gameObject);
        }
        else
        {
            return;
        }

        TabOpened?.Invoke(this, new EventArgs());
    }
Example #2
0
        public EditorDuo()
        {
            InitializeComponent();
            Upper.Processed = false;
            Lower.Processed = false;

            Upper.CreationDate = default;
            Lower.CreationDate = default;


            Upper.ProcessedDate = default;
            Lower.ProcessedDate = default;

            Upper.SetDateStamp();
            Lower.SetDateStamp();

            TabOpened?.Invoke(this, EventArgs.Empty);
            InputFocus();
        }