Skip to content

Instantly share code, notes, and snippets.

@masoo
Created December 11, 2013 00:35
Show Gist options
  • Save masoo/7903104 to your computer and use it in GitHub Desktop.
Save masoo/7903104 to your computer and use it in GitHub Desktop.
masoojer でドラゴンクエスト モンスターパレードをする。
# -*- coding: utf-8 -*-
require 'mscorlib'
require 'System'
require 'PresentationFramework'
module Masoojer
def self.dqmp
@webbrowser = System::Windows::Controls::WebBrowser.new
@webbrowser.Name = "DqmpWebBrowser"
@webbrowser.Height = System::Double.NaN
dqmp_string = System::String.new("http://www.dqmp.jp/")
@webbrowser.Source = System::Uri.new(dqmp_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.dqmpoff
$mainWindow.FindName("MainDockPanel").Children.Remove(@webbrowser)
$mainWindow.FindName("EditorComponent").Visibility = System::Windows::Visibility.Visible
end
end
menu_dq = System::Windows::Controls::MenuItem.new()
menu_dq.Name = System::String.new("MenuItemDqmp")
menu_dq.Header = System::String.new("モンパレ実行")
$menu.FindName("MenuItemTools").Items.Add(menu_dq)
$menu.RegisterName("MenuItemDqmp", menu_dq)
$menu.FindName("MenuItemDqmp").Click do |s, e|
Masoojer::dqmp
end
menu_dqoff = System::Windows::Controls::MenuItem.new()
menu_dqoff.Name = System::String.new("MenuItemDqmfOff")
menu_dqoff.Header = System::String.new("モンパレ終了")
$menu.FindName("MenuItemTools").Items.Add(menu_dqoff)
$menu.RegisterName("MenuItemDqmfOff", menu_dqoff)
$menu.FindName("MenuItemDqmfOff").Click do |s, e|
Masoojer::dqmpoff
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment