示例#1
0
        public static void ButtonClick2(object sender, RoutedEventArgs e)
        {
            Regex re     = new Regex(@"([a-zA-Z]+)(\d+)");
            Match result = re.Match(changeImage);

            string n = result.Groups[1].Value;

            var x = new NewResource.NewResource(resources.GetResourceById(n), "b" + n);

            x.ShowDialog( );

            updateImageOnMap(n);
        }
示例#2
0
        public static void ButtonClick1(object sender, RoutedEventArgs e) //dugmici
        {
            var    mouseWasDownOn = e.Source as FrameworkElement;
            string elementName    = "";

            if (mouseWasDownOn != null)
            {
                elementName = mouseWasDownOn.Name;
            }
            String n = elementName.Substring(1);
            var    x = new NewResource.NewResource(resources.GetResourceById(n), ((Button)sender).Name);

            x.ShowDialog( );
        }