public Host(FormMain mainForm) { _app = new App(); _core = new Core(mainForm); _ui = new Ui(mainForm); _database = new Db(); }
public MyControl() { if (DesignerProperties.GetIsInDesignMode(this)) { return; } try { HostApp = Factory.Create <IHostApp>(); InitializeComponent(); RecentFilesHelper.Instance.ExecuteInGUIThread = this.ExecuteInGUIThread; this.Model.ExecuteInGUIThread = this.ExecuteInGUIThread; this.Model.FetchRecentFiles(); } catch (CSScriptViewModel.CSSNotFoundException) { //the control already has the status label properly set } catch (Exception e) { MessageBox.Show(e.Message, "CS-Script Tools"); } }
public static void Init(IHostApp app) { if (hostApp != null) { hostApp.Log(LogType.WRN, "ZoomMeetingBotSDK.Sound: Already Initialized"); return; } hostApp = app; cfg = DeserializeJson <SoundConfigurationSettings>(hostApp.GetSettingsAsJSON()); hostApp.Log(LogType.DBG, "Initializing TTS"); tts = new SpeechSynthesizer(); var voice = cfg.TTSVoice; if ((voice != null) && (voice.Length > 0)) { try { tts.SelectVoice(voice); } catch (Exception e) { hostApp.Log(LogType.ERR, "TTS failed to load voice {0}; Falling back on default; Err={1}", voice, repr(e)); } } hostApp.Log(LogType.INF, "TTS Loaded voice {0}", repr(tts.Voice.Name)); tts.SetOutputToDefaultAudioDevice(); timer = new System.Threading.Timer(TimerHandler, null, 0, 250); }
public void Init(ChatBotInitParam param) { if (hostApp != null) { hostApp.Log(LogType.WRN, "chatBot already initialized"); } hostApp = param.hostApp; }
public void Init(ChatBotInitParam param) { if (hostApp != null) { hostApp.Log(LogType.WRN, $"SimpleBot.Start(): Already initialized"); return; } hostApp = param.hostApp; hostApp.SettingsChanged += new EventHandler(SettingsChanged); LoadSettings(); }
public static void SetCallback(IHostApp cb) { Callback = cb; try { if (!Directory.Exists(DataPath)) { Directory.CreateDirectory(DataPath); } } catch { } }
public static void SetCallback(IHostApp cb) { Callback = cb; }
public ServerEvents(IHostApp cb) { Server.SetCallback(cb); }
public void Run(IHostApp app) { app.ShowMessage($"Hello from {Assembly.GetExecutingAssembly().GetName().FullName}"); }