Example #1
1
        public AboutBox()
        {
            InitializeComponent();
            loc = label1.Location;

            label1.Text = "";
            try
            {
                var rm = new System.Resources.ResourceManager("BizHawk.Client.EmuHawk.Properties.Resources", GetType().Assembly);
                sfx = new SoundPlayer(rm.GetStream("nothawk"));
                sfx.Play();
            }
            catch
            {
            }

            //panel1.Size = new System.Drawing.Size(1000, 1000);
            //pictureBox5.GetType().GetMethod("SetStyle", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.InvokeMethod).Invoke(pictureBox5, new object[] { ControlStyles.SupportsTransparentBackColor | ControlStyles.UserPaint, true });
            pictureBox5.BackColor = Color.Transparent;
            pictureBox5.SendToBack();
            pictureBox3.BringToFront();
            pictureBox2.BringToFront();
            pictureBox1.BringToFront();
            pictureBox5.Visible = false;
        }
        public void Setup()
        {
            var manager = new System.Resources.ResourceManager("OpenLocationCode.Test.g", GetType().Assembly);
            using (var sr = new System.IO.StreamReader(manager.GetStream("data/v1/shortcodetests.csv")))
            {
                string line = null;
                do
                {
                    line = sr.ReadLine();
                    if (string.IsNullOrEmpty(line) == false)
                    {
                        if (line.StartsWith("#")) continue;
                        TestDataV1List.Add(new ShortFullV1DataItem(line));
                    }
                }
                while (string.IsNullOrEmpty(line) == false);
            }

            using (var sr = new System.IO.StreamReader(manager.GetStream("data/vnext/shortcodetests.csv")))
            {
                string line = null;
                do
                {
                    line = sr.ReadLine();
                    if (string.IsNullOrEmpty(line) == false)
                    {
                        if (line.StartsWith("#")) continue;
                        TestDataVNextList.Add(new ShortFullVNextDataItem(line));
                    }
                }
                while (string.IsNullOrEmpty(line) == false);
            }
        }
Example #3
0
        public AboutBox()
        {
            InitializeComponent();
            loc = label1.Location;

            label1.Text = "";
            try
            {
                var rm = new System.Resources.ResourceManager("BizHawk.Client.EmuHawk.Properties.Resources", GetType().Assembly);
                sfx = new SoundPlayer(rm.GetStream("nothawk"));
                sfx.Play();
            }
            catch
            {
            }


            //panel1.Size = new System.Drawing.Size(1000, 1000);
            //pictureBox5.GetType().GetMethod("SetStyle", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.InvokeMethod).Invoke(pictureBox5, new object[] { ControlStyles.SupportsTransparentBackColor | ControlStyles.UserPaint, true });
            pictureBox5.BackColor = Color.Transparent;
            pictureBox5.SendToBack();
            pictureBox3.BringToFront();
            pictureBox2.BringToFront();
            pictureBox1.BringToFront();
            pictureBox5.Visible = false;
        }
 public master23d16854_btnLetsGetStarted()
 {
     System.Resources.ResourceManager resourceManager = new System.Resources.ResourceManager("FundSelectorTool.g", this.GetType().Assembly);
     System.IO.Stream stream = resourceManager.GetStream("fxg/resources/navbuttons/letsgetstartedbutton.fxg.config/master23d16854_btnletsge" +
                                                         "tstarted.xaml", System.Globalization.CultureInfo.InvariantCulture);
     System.Windows.FrameworkElement content = ((System.Windows.FrameworkElement)(System.Windows.Markup.XamlReader.Load(new System.IO.StreamReader(stream).ReadToEnd())));
     this.Content = content;
 }
 public master208ace5e_btnComplianceCheck()
 {
     System.Resources.ResourceManager resourceManager = new System.Resources.ResourceManager("FundSelectorTool.g", this.GetType().Assembly);
     System.IO.Stream stream = resourceManager.GetStream("fxg/resources/navbuttons/compliancecheckbutton.fxg.config/master208ace5e_btncompl" +
                                                         "iancecheck.xaml", System.Globalization.CultureInfo.InvariantCulture);
     System.Windows.FrameworkElement content = ((System.Windows.FrameworkElement)(System.Windows.Markup.XamlReader.Load(new System.IO.StreamReader(stream).ReadToEnd())));
     this.Content = content;
 }
Example #6
0
 public static IFilePath GetFilePath()
 {
     return(new FilePathMap(new IFilePath[]
     {
         new HashFilePath(MinecraftPaths.AssetsObjects, MinecraftPaths.AssetsIndexes["1.12.json"]),
         new ZipFilePath(ResourceManager.GetStream("Vanilla"))
     }));
 }
 public master5cc0ce7e_BtnCashFlowAnalysis()
 {
     System.Resources.ResourceManager resourceManager = new System.Resources.ResourceManager("FundSelectorTool.g", this.GetType().Assembly);
     System.IO.Stream stream = resourceManager.GetStream("fxg/resources/navbuttons/cashflowanalysisbutton.fxg.config/master5cc0ce7e_btncash" +
                                                         "flowanalysis.xaml", System.Globalization.CultureInfo.InvariantCulture);
     System.Windows.FrameworkElement content = ((System.Windows.FrameworkElement)(System.Windows.Markup.XamlReader.Load(new System.IO.StreamReader(stream).ReadToEnd())));
     this.Content = content;
 }
 public master494630c1_btnAssetAllocation()
 {
     System.Resources.ResourceManager resourceManager = new System.Resources.ResourceManager("FundSelectorTool.g", this.GetType().Assembly);
     System.IO.Stream stream = resourceManager.GetStream("fxg/resources/navbuttons/assetalloctionbutton.fxg.config/master494630c1_btnasseta" +
                                                         "llocation.xaml", System.Globalization.CultureInfo.InvariantCulture);
     System.Windows.FrameworkElement content = ((System.Windows.FrameworkElement)(System.Windows.Markup.XamlReader.Load(new System.IO.StreamReader(stream).ReadToEnd())));
     this.Content = content;
 }
 public master76b60546_btnRiskAssessor()
 {
     System.Resources.ResourceManager resourceManager = new System.Resources.ResourceManager("FundSelectorTool.g", this.GetType().Assembly);
     System.IO.Stream stream = resourceManager.GetStream("fxg/resources/navbuttons/riskassessorbutton.fxg.config/master76b60546_btnriskasse" +
                                                         "ssor.xaml", System.Globalization.CultureInfo.InvariantCulture);
     System.Windows.FrameworkElement content = ((System.Windows.FrameworkElement)(System.Windows.Markup.XamlReader.Load(new System.IO.StreamReader(stream).ReadToEnd())));
     this.Content = content;
 }
Example #10
0
        internal static void SoundInit()
        {
            var resources = new System.Resources.ResourceManager("Main.Resource", System.Reflection.Assembly.GetEntryAssembly());

            sounds = new System.Media.SoundPlayer[13];

            sounds[1]  = new System.Media.SoundPlayer(resources.GetStream("missle"));
            sounds[2]  = new System.Media.SoundPlayer(resources.GetStream("magic_hit"));
            sounds[4]  = new System.Media.SoundPlayer(resources.GetStream("death"));
            sounds[5]  = new System.Media.SoundPlayer(resources.GetStream("sound_5"));
            sounds[6]  = new System.Media.SoundPlayer(resources.GetStream("hit"));
            sounds[8]  = new System.Media.SoundPlayer(resources.GetStream("miss"));
            sounds[9]  = new System.Media.SoundPlayer(resources.GetStream("step"));
            sounds[10] = new System.Media.SoundPlayer(resources.GetStream("sound_10"));
            sounds[12] = new System.Media.SoundPlayer(resources.GetStream("start_sound"));
        }
Example #11
0
        public WoW360Router()
        {
            InitializeComponent();
            this.SetStyle(ControlStyles.UserPaint, true);
            System.Resources.ResourceManager rm = new System.Resources.ResourceManager(
                "DavidNikdel.Properties.Resources",
                System.Reflection.Assembly.GetExecutingAssembly());

            // load resources
            m_controller = rm.GetObject("controller") as Bitmap;
            m_about = rm.GetObject("about") as Bitmap;
            m_keymap = rm.GetObject("keymap") as Bitmap;
            m_chimeSnd = new SoundPlayer(rm.GetStream("ding"));
            m_boopSnd = new SoundPlayer(rm.GetStream("boop"));

            // load preferences
            m_lookSensMulti = NORMAL_LOOK * m_settings.LookSensitivity;
            m_mouseSensMulti = NORMAL_MOUSE * m_settings.MouseSensitivity;
            m_home = new Vector2(m_settings.CenterOffsetX, m_settings.CenterOffsetY); // mouse center offset (in percent of quarter screen)
        }
Example #12
0
        internal static void SoundInit()
        {
            var resources = new System.Resources.ResourceManager("Main.Resource", System.Reflection.Assembly.GetEntryAssembly());

            sounds = new System.Media.SoundPlayer[13];

            sounds[1] = new System.Media.SoundPlayer(resources.GetStream("missle"));
            sounds[2] = new System.Media.SoundPlayer(resources.GetStream("magic_hit"));
            sounds[4] = new System.Media.SoundPlayer(resources.GetStream("death"));
            sounds[5] = new System.Media.SoundPlayer(resources.GetStream("sound_5"));
            sounds[6] = new System.Media.SoundPlayer(resources.GetStream("hit"));
            sounds[8] = new System.Media.SoundPlayer(resources.GetStream("miss"));
            sounds[9] = new System.Media.SoundPlayer(resources.GetStream("step"));
            sounds[10] = new System.Media.SoundPlayer(resources.GetStream("sound_10"));
            sounds[12] = new System.Media.SoundPlayer(resources.GetStream("start_sound"));
        }
 /// <summary>    
 /// GetResourceDictionary    
 /// </summary>    
 public static ResourceDictionary GetResourceDictionary(string name)
 {
     var resourceName = name;
     if (string.IsNullOrEmpty(resourceName)) { resourceName = "themes/generic.xaml"; }
     ResourceDictionary retVal = null;
     if (_resourceDictionaryCache.TryGetValue(resourceName, out retVal)) { return retVal; }
     System.Reflection.Assembly assembly = typeof(ResourceManager).Assembly;
     string baseName = string.Format("{0}.g", assembly.FullName.Split(new char[] { ',' })[0]);
     string fullName = string.Format("{0}.resources", baseName);
     foreach (string s in assembly.GetManifestResourceNames())
     {
         if (s == fullName)
         {
             System.Resources.ResourceManager manager = new System.Resources.ResourceManager(baseName, assembly);
             System.Resources.ResourceSet set = manager.GetResourceSet(CultureInfo.InvariantCulture, true, true);
             foreach (System.Collections.DictionaryEntry entry in set)
             {
                 Console.WriteLine("{0} {1}", entry.Key, entry.Value);
             }
             using (System.IO.Stream stream = manager.GetStream(resourceName))
             {
                 using (System.IO.StreamReader reader = new System.IO.StreamReader(stream))
                 {
                     retVal = System.Windows.Markup.XamlReader.Load(stream) as ResourceDictionary;//reader.ReadToEnd()
                     if (retVal != null)
                     {
                         _resourceDictionaryCache.Add(resourceName, retVal);
                         return retVal;
                     }
                 }
             }
             break;
         }
     }
     return null;
 }
 /// <summary>
 /// Gets the object.
 /// </summary>
 /// <param name="resIdentifier">The res identifier.</param>
 /// <returns>
 /// The object.
 /// </returns>
 public static UnmanagedMemoryStream GetObject(string resIdentifier)
 {
     Assert.ArgumentNotNullOrEmpty(resIdentifier, "resIdentifier");
     return(_rm.GetStream(resIdentifier));
 }
Example #15
0
        public bool CheckObject(Object selObject)
        {
            if (DebugCheck(3))
            {
                System.Media.SoundPlayer player = new System.Media.SoundPlayer(resmgr.GetStream("fgth_welcome", ci));
                player.Play();
            }

            // selObject=AppointmentItem => Kalenderliste + Doppel-klick auf Kalendereinträge
            // selObject=MeetingItem => Meetings in Mailliste + Doppel-klick auf Mails

            /*
             * The AppointmentItem object represents a meeting, a one-time appointment, or a recurring appointment or meeting in the Calendar folder.
             * The AppointmentItem object includes methods that perform actions such as responding to or forwarding meeting requests,
             * and properties that specify meeting details such as the location and time.
             * */

            if (selObject is MeetingItem)
            {
                DPrint(I18n("RECOGNIZED") + " - MeetingItem", 2);
                selObject = (selObject as MeetingItem).GetAssociatedAppointment(false);
            }

            if (!(selObject is AppointmentItem) || (selObject as AppointmentItem) == null || (selObject as AppointmentItem).EntryID == null)
            {
                if (selObject == null)
                {
                    DPrint("selObject " + I18n("IS_NULL"), 0);
                }
                return(false);
            }
            // https://docs.microsoft.com/de-de/office/vba/api/outlook.appointmentItem#properties
            AppointmentItem apptItem = (selObject as AppointmentItem);
            // https://docs.microsoft.com/de-de/office/vba/api/outlook.appointmentitem.meetingstatus
            bool isMeeting = (MeetingStatusToInt(apptItem.MeetingStatus) != 0);

            DPrint(I18n("RECOGNIZED") + " - AppointmentItem: isMeeting=" + isMeeting.ToString(), 2);

            // https://docs.microsoft.com/de-de/office/vba/api/outlook.appointmentitem.organizer
            string Organizer_Name;
            string Organizer_Full = null;

            if (apptItem.Organizer == null && MeetingStatusToInt(apptItem.MeetingStatus) == 1)  // my own non-sended meeting, in this case GetOrganizer() is obsolete.
            {
                Organizer_Name = apptItem.SendUsingAccount.UserName;
                DPrint("apptItem.SendUsingAccount.DisplayName=\"" + apptItem.SendUsingAccount.DisplayName + "\"", 2);
            }
            else
            {
                // https://docs.microsoft.com/de-de/office/vba/api/outlook.appointmentitem.getorganizer
                string[] result = AdressEntryNameExtract(apptItem.GetOrganizer());
                if (result != null)
                {
                    Organizer_Name = result[0];
                    Organizer_Full = result[1];
                }
                else
                {
                    Organizer_Name = apptItem.Organizer;
                }
            }
            DPrint("apptItem.MeetingStatus=\"" + apptItem.MeetingStatus + "\"", 2);
            if (apptItem.GetOrganizer().Name != apptItem.Organizer)
            {
                DPrint("DIFF: apptItem.GetOrganizer().Name=\"" + apptItem.GetOrganizer().Name + "\" / apptItem.Organizer=\"" + apptItem.Organizer + "\"", 0);
            }
            Organizer_Name = Organizer_Name ?? "[" + I18n("ORGANIZER") + " " + I18n("IS_EMPTY") + "]";
            Organizer_Full = Organizer_Full ?? Organizer_Name;

            // https://docs.microsoft.com/de-de/office/vba/api/outlook.appointmentitem.subject
            string Subject = apptItem.Subject;

            // https://docs.microsoft.com/de-de/office/vba/api/outlook.appointmentItem.recipients
            string[] output = Recipients(apptItem.Recipients, (apptItem.GetOrganizer() != null ? apptItem.GetOrganizer().ID : ""));
            //string[] output = Recipients(apptItem.Recipients, "");
            // TODO testing is this without organizer?? testing with somebody
            string RequiredAttendees_Names = output[0];
            string OptionalAttendees_Names = output[1];
            string RequiredAttendees_Full  = output[2];
            string OptionalAttendees_Full  = output[3];
            bool   Acceptable = MeetingStatusToInt(apptItem.MeetingStatus) == 3;
            int    Importance = MessgageImportanceToInt(apptItem.Importance);

            Subject = Subject ?? "[" + I18n("SUBJECT") + " " + I18n("IS_EMPTY") + "]";

            SetElements(new string[] { Subject, Organizer_Name, RequiredAttendees_Names, OptionalAttendees_Names }, 0);
            SetElements(new string[] { I18n("SUBJECT"), I18n("ORGANIZER"), I18n("REQUIRED_ATTENDEES"), I18n("OPTIONAL_ATTENDEES") }, 1);
            SetElements(new string[] { Subject, Organizer_Full, RequiredAttendees_Full, OptionalAttendees_Full }, 2);
            // https://docs.microsoft.com/de-de/office/vba/api/outlook.meetingitem.importance
            CheckImage((System.Drawing.Bitmap)resmgr.GetObject("important", ci), 0, Importance == 2);
            SetElement(Acceptable && setting.AcceptButton ? I18n("ACCEPT") : null, 4, 0);
            SetElement(Acceptable && setting.AcceptButton ? I18n("ACCEPT") : null, 4, 1);
            SetElement(Acceptable && setting.AcceptButton ? I18n("ACCEPT") : null, 4, 2);
            SetElement(Acceptable && setting.AcceptButton ? apptItem : null, 4);
            return(true);
        }