Created
December 7, 2013 08:20
-
-
Save masoo/7838591 to your computer and use it in GitHub Desktop.
masoojer で艦隊これくしょんをする。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
require 'mscorlib' | |
require 'System' | |
require 'PresentationFramework' | |
module Masoojer | |
def self.kancolle | |
@webbrowser = System::Windows::Controls::WebBrowser.new | |
@webbrowser.Name = "KancolleWebBrowser" | |
@webbrowser.Height = System::Double.NaN | |
kancolle_string = System::String.new("http://www.dmm.com/netgame/feature/kancolle.html") | |
@webbrowser.Source = System::Uri.new(kancolle_string) | |
$mainWindow.FindName("EditorComponent").Visibility = System::Windows::Visibility.Collapsed | |
System::Windows::Controls::DockPanel.SetDock(@webbrowser, System::Windows::Controls::Dock.Top) | |
$mainWindow.FindName("MainDockPanel").Children.Add(@webbrowser) | |
end | |
def self.kancolleoff | |
$mainWindow.FindName("MainDockPanel").Children.Remove(@webbrowser) | |
$mainWindow.FindName("EditorComponent").Visibility = System::Windows::Visibility.Visible | |
end | |
end | |
menu_kc = System::Windows::Controls::MenuItem.new() | |
menu_kc.Name = System::String.new("MenuItemKancolle") | |
menu_kc.Header = System::String.new("艦これ出撃") | |
$menu.FindName("MenuItemTools").Items.Add(menu_kc) | |
$menu.RegisterName("MenuItemKancolle", menu_kc) | |
$menu.FindName("MenuItemKancolle").Click do |s, e| | |
Masoojer::kancolle | |
end | |
menu_kcoff = System::Windows::Controls::MenuItem.new() | |
menu_kcoff.Name = System::String.new("MenuItemKancolleOff") | |
menu_kcoff.Header = System::String.new("艦これ撤退") | |
$menu.FindName("MenuItemTools").Items.Add(menu_kcoff) | |
$menu.RegisterName("MenuItemKancolleOff", menu_kcoff) | |
$menu.FindName("MenuItemKancolleOff").Click do |s, e| | |
Masoojer::kancolleoff | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment