private static void PrintScreenArray(ref AnimaControl AC) { Console.Write("["); for (int Column = 0; Column < Screen.AllScreens.Length /* -1 */; Column++) { if (AC.SA.Arr[Column] == null) { Console.Write("No Screen"); } else { var IsPrimary = AC.SA.Arr[Column].Primary ? " Primary" : " Secondary"; Console.Write("Screen:" + AC.SA.Arr[Column].DeviceName + IsPrimary); } } Console.WriteLine("]"); }
public TraySystem(AnimaControl _AC) { AC = _AC; TrayMenu = new ContextMenu(); TrayMenu.Name = "Anima V2.0"; TrayMenu.MenuItems.Add("Settings", OpenSettings); //Set to the settings form, for now just the voice one. TrayMenu.MenuItems.Add("Exit", CloseProgram); m_notifyIcon = new NotifyIcon(); m_notifyIcon.Text = "Anima V2.0"; m_notifyIcon.Visible = true; m_notifyIcon.Icon = new System.Drawing.Icon(SystemIcons.Information, 40, 40); m_notifyIcon.ContextMenu = TrayMenu; //m_notifyIcon.DoubleClick += new System.EventHandler(TrayClick); }
private void Window_Loaded(object sender, RoutedEventArgs e) { AC = new AnimaControl(); AC.PassCode += new EventHandler <AnimaControlEventArgs>(UpdateForm); Point Start = AC.DetermineRight(new Anima.Size(this.Width, this.Height)); SetPosition(Start); TraySystem TS = new TraySystem(AC); TS.AskToClose += new EventHandler(CloseProgram); this.MaxHeight = this.Height; this.MaxWidth = this.Width; this.MinHeight = this.Height; this.MinWidth = this.Width; }
private static void Poem(ref AnimaControl AC) { List <string> Poem = new List <string>(); while (true) { Console.Write("Say: "); string Message = Console.ReadLine(); if (Message == "") { break; } Poem.Add(Message); AC.AnimaSpeak(Message); } foreach (string line in Poem) { AC.AnimaSpeak(line); } }
static void Main() { AnimaControl AC; AC = new AnimaControl(); using (SpeechSynthesizer synth = new SpeechSynthesizer()) { Console.WriteLine("Installed voices -"); foreach (InstalledVoice voice in synth.GetInstalledVoices()) { VoiceInfo info = voice.VoiceInfo; Console.WriteLine(" Voice Name: " + info.Name); } } //AC.AnimaSpeak("Irashai-masen Goshujin-sama"); Console.WriteLine(); Console.WriteLine("Name: " + AC.Voice.Voice.Name); Console.WriteLine("Gender: " + AC.Voice.Voice.Gender); Console.WriteLine("Age: " + AC.Voice.Voice.Age); Console.WriteLine("Culture: " + AC.Voice.Voice.Culture); Console.WriteLine("Description: " + AC.Voice.Voice.Description); Console.WriteLine(); //Poem(ref AC); ScreenArray SA = new ScreenArray(); Console.WriteLine("Screen Array: "); PrintScreenArray(ref AC); Console.ReadKey(); }