Пример #1
0
 public void Close(EndCode code)
 {
     if(code != EndCode.Hidden) {
         pluginServer = null;
         shellBrowser = null;
     }
 }
Пример #2
0
 public void Close(EndCode code)
 {
     pluginServer = null;
     if(memoForm != null) {
         memoForm.Dispose();
     }
 }
Пример #3
0
 public void Close(EndCode endCode)
 {
     if(migemoWrapper != null) {
         migemoWrapper.Dispose();
         migemoWrapper = null;
     }
 }
Пример #4
0
 public void Close(EndCode code) {
     // If endCode is NOT EndCode.Hidden, QTTabBar loses the reference to this plugin instance after this call.
     // Clean up managed/unmanaged resources here if any.
     // 
     // EndCode.Hidden is passed only when this has PluginType.Background attribute and toolbar item is disabled by user.
     // In this case, the plugin is still alive and can interact with user. 
     // Do not clean up resources.
 }
Пример #5
0
        public void Close(EndCode code) {
            if(timer != null) {
                timer.Dispose();
            }

            if(labelTime != null) {
                labelTime.Dispose();
            }
        }
Пример #6
0
        public void Close(EndCode code) {
            this.pluginServer = null;
            this.shellBrowser = null;

            if(this.button != null) {
                this.button.Dispose();
            }

            if(this.fvmw != null) {
                this.fvmw.Dispose();
            }
        }
Пример #7
0
        public void Close(EndCode code) {
            pluginServer = null;
            shellBrowser = null;

            if(button != null) {
                button.Dispose();
            }

            if(fvmw != null) {
                fvmw.Dispose();
            }
        }
Пример #8
0
 public void Close(EndCode code) {
     if(pluginClient != null) {
         try {
             pluginClient.Close(code);
         }
         catch(Exception exception) {
             PluginManager.HandlePluginException(exception, IntPtr.Zero, pluginInfo.Name, "Closing plugin.");
         }
         pluginClient = null;
     }
     pluginInfo = null;
 }
Пример #9
0
 public void Close(EndCode code) {
     pluginServer = null;
 }
Пример #10
0
 public void Close(EndCode code) {
     pluginServer = null;
     shellBrowser = null;
 }
Пример #11
0
 public void Close(EndCode code) {
     if(code != EndCode.Hidden)
         pluginServer = null;
 }
Пример #12
0
 public void Close(EndCode endCode) {
     if(this.migemoWrapper != null) {
         this.migemoWrapper.Dispose();
         this.migemoWrapper = null;
     }
 }
Пример #13
0
 public void Close(EndCode code) {
     this.pluginServer = null;
     this.shellBrowser = null;
 }
Пример #14
0
 ///<summary>Sets the value of the <c>&lt;End&gt;</c> element.</summary>
 /// <param name="Code">Code representing the year level.</param>
 ///<remarks>
 /// <para>This form of <c>setEnd</c> is provided as a convenience method
 /// that is functionally equivalent to the <c>End</c></para>
 /// <para>Version: 2.6</para>
 /// <para>Since: 2.3</para>
 /// </remarks>
 public void SetEnd(EndCode Code)
 {
     RemoveChild(SchoolDTD.ACADEMICYEARRANGE_END);
     AddChild(SchoolDTD.ACADEMICYEARRANGE_END, new End(Code));
 }
Пример #15
0
 public void Close(EndCode endCode)
 {
 }
Пример #16
0
 public void Close(EndCode code) {
     pluginServer = null;
     if(memoForm != null) {
         memoForm.Dispose();
     }
 }
Пример #17
0
 public void UnloadPluginInstance(string pluginID, EndCode code)
 {
     Plugin plugin;
     dicFullNamesMenuRegistered_Sys.Remove(pluginID);
     dicFullNamesMenuRegistered_Tab.Remove(pluginID);
     if(!dicPluginInstances.TryGetValue(pluginID, out plugin)) return;
     RemoveEvents(plugin.Instance);
     dicPluginInstances.Remove(pluginID);
     plugin.Close(code);
 }
Пример #18
0
 private void JudgeData(string strData)
 {
     if (string.IsNullOrEmpty(StartCode) && string.IsNullOrEmpty(EndCode))
     {
         OnDataReceived?.Invoke(strData);
     }
     else if (string.IsNullOrEmpty(StartCode) && EndCode.Equals("CRLF"))
     {
         while (true)
         {
             if (strData.IndexOf("\r\n") > -1)
             {
                 try
                 {
                     string str = strData.Substring(0, strData.IndexOf("\r\n"));
                     OnDataReceived?.Invoke(strData);
                     _strRemain = strData.Substring(strData.IndexOf("\r\n") + 2);
                     strData    = _strRemain;
                 }
                 catch
                 {
                     return;
                 }
             }
             else
             {
                 break;
             }
         }
         _strRemain = strData;
     }
     else if (string.IsNullOrEmpty(StartCode) && EndCode.Equals("CR"))
     {
         while (true)
         {
             if (strData.IndexOf("\r") > -1)
             {
                 try
                 {
                     string str = strData.Substring(0, strData.IndexOf("\r"));
                     OnDataReceived?.Invoke(strData);
                     _strRemain = strData.Substring(strData.IndexOf("\r") + 1);
                     strData    = _strRemain;
                 }
                 catch
                 {
                     return;
                 }
             }
             else
             {
                 break;
             }
         }
         _strRemain = strData;
     }
     else if (string.IsNullOrEmpty(StartCode) && EndCode.Equals("ETX"))
     {
         while (true)
         {
             char ch = '\x03';
             if (strData.IndexOf(ch) > -1)
             {
                 string str = strData.Substring(0, strData.IndexOf(ch));
                 OnDataReceived?.Invoke(str);
                 _strRemain = strData.Substring(strData.IndexOf(ch) + 1);
                 strData    = _strRemain;
             }
             else
             {
                 break;
             }
         }
         _strRemain = strData;
     }
     else if (StartCode.Equals("STX") && EndCode.Equals("ETX"))
     {
         while (true)
         {
             char ch1 = '\x0002';
             char ch2 = '\x0003';
             if (strData.IndexOf(ch1) > -1 && strData.IndexOf(ch2) > -1)
             {
                 string str = strData.Substring(strData.IndexOf(ch1), strData.IndexOf(ch2));
                 OnDataReceived?.Invoke(str);
                 _strRemain = strData.Substring(strData.IndexOf(ch2) + 1);
                 strData    = _strRemain;
             }
             else
             {
                 break;
             }
         }
         _strRemain = strData;
     }
     else
     {
         while (true)
         {
             if (strData.IndexOf(StartCode) > -1 && strData.IndexOf(EndCode) > -1)
             {
                 string str = strData.Substring(strData.IndexOf(StartCode), strData.IndexOf(EndCode));
                 OnDataReceived?.Invoke(str);
                 _strRemain = strData.Substring(strData.IndexOf(EndCode) + EndCode.Length);
                 strData    = _strRemain;
             }
             else
             {
                 break;
             }
         }
         _strRemain = strData;
     }
 }
Пример #19
0
 public void Close(EndCode code)
 {
     pluginServer = null;
     shellBrowser = null;
 }
Пример #20
0
 public void Close(EndCode endCode) {
 }
Пример #21
0
 /// <summary>
 /// Sets the value of the <c>&lt;Code&gt;</c> element.
 /// </summary>
 /// <param name="val">A EndCode object</param>
 /// <remarks>
 /// <para>The SIF specification defines the meaning of this element as: "Code representing the year level."</para>
 /// <para>Version: 2.6</para>
 /// <para>Since: 2.3</para>
 /// </remarks>
 public void SetCode(EndCode val)
 {
     SetField(SchoolDTD.END_CODE, val);
 }
Пример #22
0
 /// <summary>
 /// Constructor that accepts values for all mandatory fields
 /// </summary>
 ///<param name="code">Code representing the year level.</param>
 ///
 public End(EndCode code) : base(SchoolDTD.END)
 {
     this.SetCode(code);
 }
Пример #23
0
 public void Close(EndCode code)
 {
     this.pluginServer = null;
 }
Пример #24
0
 public void Close(EndCode code) {
     this.pluginServer = null;
     if(this.memoForm != null) {
         this.memoForm.Dispose();
     }
 }