mono

How to print bitmap without zoom from MVC controller in Debian

杀马特。学长 韩版系。学妹 提交于 2020-01-14 06:52:00
问题 Document is printed from MVC controller to Debian Squeeze Linux server printer using code below in Mono. Page in printer is A4. Printed text in paper is too big and unsharp. Rightmost part of text is not visible since it does not fit to page. If printed from Windows from .NET to HP Laserjet, output is correct. So it looks like Mono or Samsung ML-331x Series printer zooms bitmap for unknown reason which causes too big and unsharp output. How to fix this so that bitmap is printed like in

Which IDE do I use to develop a mono app in IronPython? [closed]

戏子无情 提交于 2020-01-14 03:08:49
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I'm investigating which platform to use for a cross platform GUI app that needs access to the serial port. Currently I'm thinking on using the mono runtime and monodevelop as the IDE. However, I already have a corpus of prototype code written python. Therefore, my idea was to write the mono app in IronPython as

Why does 0.5 rounded with MidpointRounding.AwayFromZero result in 0?

一曲冷凌霜 提交于 2020-01-13 10:16:09
问题 Why does this result in 0 and not 1? Math.Round(0.5, 0, MidpointRounding.AwayFromZero) Here's an example: http://ideone.com/ayMVO 回答1: Normally, with issues like that, it's because the number cannot be represented exactly in IEEE754 - it's most likely it's being converted to 0.4999999999... or something like that which would round to zero. However, 0.5 (1/2) is exactly representable in IEEE754 so that's not the case here. It's possible that the compiler made a mistake in converting the text

Search Dialog in Mono Android

梦想与她 提交于 2020-01-13 09:06:09
问题 I'm trying to implement a search dialog in a Mono Android app per the documentation here: http://developer.android.com/guide/topics/search/search-dialog.html I have an activity that the user should be able to search from: [Activity (Label = "MyActivity", MainLauncher = true, Icon = "@drawable/icon", Theme = "@style/MyStyle")] [MetaData ("android.app.default_searchable", Value = ".SearchActivity")] public class MainActivity : BaseActivity {... I have a searchable activity (where the heavy

Is MonoGame really cross-platform?

别等时光非礼了梦想. 提交于 2020-01-13 08:44:29
问题 When I download MonoGame (which I will use in place of XNA since I'm on a Mac) and unzip it, all the MonoDevelop solution files are named MonoGame.Framework.[PLATFORM NAME].sln , with [PLATFORM NAME] being, well, the name of the OS. And the code in the tutorials is different for each platform, so it appears that for a MonoGame app to run on a different machine, it must be ported. Is this correct? If so, what other versions of XNA are there for Mono, preferably that work on the Xbox 360? I've

How To Print Image with GTKSharp

僤鯓⒐⒋嵵緔 提交于 2020-01-13 05:43:08
问题 I'm porting an C# .NET application to Mono .NET for executing in OSX. Part of the application involves printing an image. Fairly easy in .NET and boils down to primarily e.Graphics.DrawImage(img, new Rectangle(x, y, printSize.Width, printSize.Height)); in the PrintDocument's PrintPage event. Mono does not have a full implementation of System.Drawing.Printing so it seems that the best way to go about doing this is using GtkSharp. I've found some examples online as to how to print text using a

Waiting for debugger to connect

眉间皱痕 提交于 2020-01-13 05:32:07
问题 (excuse me for my english!) When i debug my app, the simulator is opening but with nothing... in the monodevelop ide, it shows alert box with message "Waiting for debugger to connect..." sometime, the simulator ask me the applicaton to load... but which? why? in the past, i had monodevelop 2.6 installed, then monodevelop 2.6 and 2.8 together, NOW: only monodevelop 2.8 can somebody help me? how i can resolve all this troubles? thank you 回答1: Try to restart MonoDevelop . Then reset IOS

How to get available virtual and physical memory size under Mono?

会有一股神秘感。 提交于 2020-01-12 08:05:35
问题 Is there any way to get available virtual and physical memory size when running under Mono? 回答1: You could use this implementation of the "free" command (UNIX) to find out used and available physical memory (it is the best option IMHO): using System; using System.Text.RegularExpressions; using System.IO; namespace FreeCSharp { class MainClass { public static void Main(string[] args) { FreeCSharp free = new FreeCSharp(); free.GetValues(); long buffersPlusCached = free.Buffers + free.Cached;

Writing an Addin or Plugin Framework in C#

此生再无相见时 提交于 2020-01-12 07:58:11
问题 I am writing an Addin Framework in C# and I'm wondering how I can make Addin's unloadable without requiring a restart of the application. I heard of AppDomains but how do these work? Can an Addin add extendability classes and be called in the Main AppDomain by Interfaces and still be unloadable and call cleanup code resulting in those classes being removed without that Assembly being in the Main AppDomain? Or are there other methods of achieving unloadable addins, but IIRC other then

Mono problems with cert and mozroots

落爺英雄遲暮 提交于 2020-01-12 07:08:07
问题 I am using this command on my mono VM sudo mozroots --import --sync It appears to be getting the cert from this site. I then try to connect to my ssl site and i get the exception that the cert is invalid. I use firefox and see the cert was issued in 2010. I looked at that file and see the last time its been updated was 2009-05-21 12:50 When using firefox on the same machine i can navigate to the same url i am trying to connect to and i get no ssl issues. (no alert nor asking me to add it to